import Vue from 'vue'
import Router from 'vue-router'

import Home from './views/Home.vue'
import Recommend from './views/Recommend.vue'

Vue.use(Router)

export default new Router({
  routes: [
    { // 首页部分
      path: '/',
      name: 'home',
      component: Home,
      children:[
        {path:"/",redirect:"/recommend"},
        {path:"/recommend",component:Recommend},
        {path:"rank",component:() => import('./views/Rank.vue')},
        {path:"search",component:() => import('./views/Search.vue')},
      ]
    },
    { // 列表
      path: '/list',
      component: () => import('./views/List.vue')
    }
  ]
})
